<template>
    <div class="big">
        <div>
            <div class="amap-page-container">
                <el-amap vid="amapDemo" :zoom="zoom" :center="center" class="amap-demo">
                <!-- <el-amap-polyline :editable="polyline.editable"  :path="polyline.path" :events="polyline.events" :key="polyline.id"></el-amap-polyline> -->
                <!-- <el-amap-rectangle v-for="retangle in retangles" :events="retangle.events" :center="retangle.center"  :bounds="retangle.bounds" :fill-color="retangle.fillColor" :fill-opacity="retangle.fillOpacity" :key="retangle.id"></el-amap-rectangle> -->
                </el-amap>
            </div>

        </div>
    </div>
</template>
<style>
    /* .big{
        background-color: rgb(255, 255, 255);
        height: 600px;
        width: 600px;
    } */
    .amap-page-container {
        height: 400px;
        width: 600px;
    }
</style>
<script>
import { showgoods_post,shouhuo_post,goods_get } from './axios_api/api';
  export default {
    data() {
      return {
        tableData: [],
          zoom: 12,
          center: [116.418757,39.917544],
          retangles: [
            {
              // visible:true,
              id:1,
              center: [116.418757,39.917544],
              bounds: [[116.418757,39.917544], [119.137357,36.709494]],
              fillOpacity: 0.7,
              fillColor: '#ffffff',
              events: {
                click: () => {
                  alert('click');
                }
              }
            }
          ]
      }
    },
    mounted(){
    },
    methods:{
        shouhuo(id){
            var id = id
            var data = {id:id}
            shouhuo_post(data).then(resp=>{
                this.$Message(resp.message)
            })
        },

    }
  }
</script>
